<%--
  Created by IntelliJ IDEA.
  User: 86131
  Date: 2021/5/26
  Time: 10:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>
<html>
<head>
    <title>首页</title>
</head>
<body>
<div align="center">
        <h1 align="center">空气质量监测信息库</h1>
        <form  action="/Find" method="post">
            按区域查询
            <select name="districtId">
            <option value="0" >不限</option>
            <c:forEach var="dis" items="${allDistrict}"  >
                <option
                        <c:if test="${dis.id==districtId}">selected="selected"
                        </c:if>
                            value="${dis.id}">${dis.name}
                </option>
            </c:forEach>
        </select><br><br>
            <input type="submit"  value="查找"/>
        </form>
        <a href="add" style="text-align: center">添加空气质量信息</a>
        <table border="1" cellpadding="0" cellspacing="0" width="500px" style="color: blue">
            <tr style="background-color: deepskyblue">
                <th>序号</th>
                <th>区域</th>
                <th>监测时间</th>
                <th>PM10数据</th>
                <th>PM2.5数据</th>
                <th>监测站</th>
            </tr>
            <c:forEach var="air" items="${pageInfo.list}">
                <tr align="center">
                    <td>${air.id}</td>
                    <td>${air.name}</td>
                    <td>${air.monitorTime}</td>
                    <td>${air.pm10}</td>
                    <td>${air.pm25}</td>
                    <td>${air.monitoringStation}</td>
                </tr>
            </c:forEach>
        </table>
    <div align="center">
        <a href="Find?pageNo=1&districtId=${districtId}">首页</a>
        <a href="Find?pageNo=${pageInfo.prePage}&districtId=${districtId}">上一页</a>
        <a href="Find?pageNo=${pageInfo.nextPage}&districtId=${districtId}">下一页</a>
        <a href="Find?pageNo=${pageInfo.lastPage}&districtId=${districtId}">末页</a>
        &nbsp;第${pageInfo.pageNum}页/共${pageInfo.pages}页
    </div>
</div>
</body>
</html>
